<?php
//dezend by http://www.yunlu99.com/ QQ:270656184
class CI_Controller
{
	/**
	 * Reference to the CI singleton
	 *
	 * @var	object
	 */
	static private $instance;

	public function __construct()
	{
		self::$instance = &$this;

		foreach (is_loaded() as $var => $class) {
			$this->$var = &load_class($class);
		}

		$this->load = &load_class('Loader', 'core');
		$this->load->initialize();
		log_message('info', 'Controller Class Initialized');
	}

	static public function& get_instance()
	{
		return self::$instance;
	}
}

defined('BASEPATH') || exit('No direct script access allowed');

?>
